package d0320;



import java.io.*;



import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

public class FileWithDataInputStreamTest {
    public static void main(String[] args) {
        FileInputStream fis=null;
        DataInputStream dis=null;
        File file = new File("src/d0320/data.bin");

        try {
            fis = new FileInputStream(file);
            dis = new DataInputStream(fis);
            System.out.println(dis.readInt()+"\t");
        }
        catch (IOException e) {
            e.printStackTrace();
        }finally {
            if(null != dis){
                try {
                    dis.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }

            }
            if(null != fis){
                try {
                    fis.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }

            }

        }
    }
}